﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IvyOrm
{
    /// <summary>
    /// Designates a column as primary key for Insert, Update and Delete operations
    /// </summary>
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
    public sealed class PrimaryKeyAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public PrimaryKeyAttribute()
        { }

        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public PrimaryKeyAttribute(PrimaryKeyOptions options)
        {
            this.Options = options;
        }

        /// <summary>
        /// Provides additional options for columns designated with the PrimaryKeyAttribute
        /// </summary>
        public PrimaryKeyOptions Options { get; private set; }
    }
}
